package analyser.impl;


import java.util.Comparator;
import java.util.List;
import java.util.Set;
import java.util.TreeSet;

import comparetor.BirthdayComparator;

import analyser.DataAnalyser;
import pojo.Customer;

public class DataAnalyserImpl implements DataAnalyser {
	private List<Customer> customers;
	public DataAnalyserImpl(List<Customer> customer){
		
		this.customers=customer;
	}
	public Set<Customer> analyse(Comparator<Customer> comp) {
		Set<Customer> set=new TreeSet<Customer>(comp);
		for(Customer c:customers){
			set.add(c);
		}
		return set;
	}
	
	

}
